package main

import (
	"fmt"
	"github.com/labstack/gommon/log"
	"time"
)

func main() {

	for {
		go driv(1, 0)
		time.Sleep(time.Second * 10)
	}
	time.Sleep(time.Hour * 1)

}

func driv(a, b int) {
	defer recoverGoPanci()
	c := a / b
	fmt.Println(c)
}

func recoverGoPanci() {
	if r := recover(); r != nil {
		log.Warn("testError() 遇到错误:", r)
	}
}
